<template>
  <div @click="toggleClick">
    <span :class="[{'is-collapse': !isActive}, 'hamburger']">
      <i class="iconfont icon-zhankaicaidan1 hamburger-icon"></i>
    </span>
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    },
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style lang="scss" scoped>
.hamburger {
  display: inline-block;
  vertical-align: middle;
}

.is-collapse {
  .hamburger-icon {
    display: inline-block;
    transform: rotate(180deg);
  }
}
</style>
